using UnityEngine;

public class ChaseMobLogic : BaseMobLogic
{
	private float chaseToDistance;

	private Transform target;

	public override void OnStart(LogicController contriller, string enterFromLogic, params object[] args)
	{
		base.OnStart(contriller, enterFromLogic);
		LogicEvent(3);
		LogicEvent(6);
		target = (Transform)args[0];
		chaseToDistance = (float)args[1];
		LogicEvent(9, target, chaseToDistance);
		LogicEvent(7);
	}

	public override void OnEvent(int name, params object[] args)
	{
		switch ((mobAssignerEvent)name)
		{
		case mobAssignerEvent.TargetInShootRande:
			ChangeLogic("Spoot", target, chaseToDistance);
			break;
		case mobAssignerEvent.TargetClear:
			ChangeLogic("Walk");
			break;
		case mobAssignerEvent.ImStuck:
			ChangeLogic("Idle", 0.1f, 2f);
			break;
		}
		base.OnEvent(name, args);
	}

	public override void OnStop()
	{
		base.OnStop();
	}
}
